﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using XZL.GM.Bll;
using XZL.GM.Dal;


public partial class Course_BuyAccount : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            BindCourseCount();

        }
    }

    private void BindCourseCount()
    {
        int? count = 0;

        RepAmount.DataSource = CourseInfoBiz.GetCourseBuyAmount( netPager.CurrentPageIndex, netPager.PageSize, ref count);
        RepAmount.DataBind();
        netPager.RecordCount = count.Value;


    }


    /// <summary>
    /// 分页控件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void netPager_PageChanged(object sender, EventArgs e)
    {
        BindCourseCount();
    }

    protected void btnSelect_Click(object sender, EventArgs e)
    {
        BindCourseCount();
        netPager.CurrentPageIndex = 1;
    }

}